#include"ProcessPool.hpp"
#include"Task.hpp"

int main(int argc,char *argv[])
{
    if(argc!=2)
    {
        Usage(argc[0]);
        return UsageError;
    }
    int num=std::stoi(argc[1]);
    ProcessPool *pp=new ProcessPool(num,Worker);

    pp->InitProcessPool();

    pp->DispatchTask();

    pp->CleanProcessPool();

    delete pp;
    return 0;
}